import request from '@/utils/request'

const api_name = '/eduservice/teacher'

export default {
  getPageList(page, pageSize, searchObj) {
    return request({
      url: `${api_name}/page/${page}/${pageSize}`,
      method: 'post',
      data: searchObj
    })
  },
  removeById(teacherId) {
    return request({
      url: `${api_name}/delete/${teacherId}`,
      method: 'delete'
    })
  },
  save(teacher) {
    return request({
      url: `${api_name}/create`,
      method: 'post',
      data: teacher
    })
  },
  getById(id) {
    return request({
      url: `${api_name}/search/${id}`,
      method: 'get'
    })
  },
  updateById(teacher) {
    return request({
      url: `${api_name}/update`,
      method: 'put',
      data: teacher
    })
  },
  getList() {
    return request({
      url: `${api_name}/finall`,
      method: 'get'
    })
  },
}
